package com.tikou.androidadvanceproject.proxy;

import android.util.Log;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Created by Tikou on 2017/10/26.
 * 作者：TianNuo
 * 邮箱：1320917731@qq.com
 * 说明：动态代理接口 InvocationHandler
 * 参考：
 */

public class DynamicBankProxy implements InvocationHandler{
    private Object object;

    public DynamicBankProxy(Object object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Log.e("proxy","银行统计");
        Object result = method.invoke(object,args);
        Log.e("proxy","完成");
        return result;
    }
}
